ee122fandomcom-20200213-history
Routers
Why Routers are important because they faciliate the traffic in the internet and other packet switched networks What A router is a device that serves as a packet switch. It takes incoming packets and looks up their end destination in their forwarding table and sends that packet to the correct next packet switch. How Routers move packets by looking information from the network layer rather than from the link layer Driving Example The routing process works in a very similar to how a driver from Philadelphia tries to drive to Orlando without a map or GPS. He would: #Start at Philadelphia and stop at a local gas station and ask for directions to Florida. The guy would tell him to get to I-95 South #When he gets to Florida, he stops at Jacksonville to ask for directions again. #etc Physically Input Ports *Line termination function performs physical layer functionality *Data link processing function performs link layer functionality *Performs routing function and forwarding and if necessary, the packet is stored in a queue if the switching fabric is too busy The router must be able to perform lookups at the speed that physical bits are flowing in, otherwise, we will create blockages in the input ports. This can be done in a couple of ways: #Keep local copy of forwarding table at each input port #Keep forwarding information in a tree data structure to improve lookup Switching Fabric *Connects input and output ports The switching fabric is at the heart of the router and is responsible for driving data inside of the router. There are a few primary ways that routers use to switch their packets #Switch by Memory - In this scheme, the packet is copied into memory when it arrives from the input port and then copied to the correct output port once the table lookup is complete (this could have already been done at the input port) #Switch via Bus #Switch via an interconnected network - more advanced version of switch via Bus that overcomes the bus bandwidth by connecting 2n buses together Output Ports *Stores packets that have been forwarded to it *Data link processing function performs link layer functionality *Line termination function performs physical layer functionality One important factor in all of this is the switching speed. That is, how many packets can the switching fabric handle each time unit. We note that if the switching speed is n \times line speed , then we cannot experience any queuing at the input ports However, under the assumption that the switching speed is the same as above, if all of the input ports are driving traffic through the output port, then we will naturally experience queuing since only one packet can leave the ouput port at each time unit Therefore, there are a few important considerations that must be addressed: #Size of buffers? We need to know how to design our buffers to absorb heavy amounts of traffic #Which packet to remove from the queue first? This service is called the packet scheduler 'and there are a couple of schemes in place. We could either use the standard FIFO queue strategy, or we could have some sort of weighting mechanism. Packet scheduling plays a big role in quality of service guarantees #Which packets should we drop? When the queue is full or is in danger of filling up, we must use some strategy to figure out which packets we want to drop. When the queue is simply full, we must make the choice to drop the arriving packet ('drop-tail) or one of the packets that are already in our queue. We could also use a strategy called Random Early Detection in which we drop packets according to a probabilistic model based on how many elements are already in our queue #Dealing with Head of Line Blocking - If a packet in the input port is waiting for another packet on the input port, then every packet behind the initial packet will end up waiting even if the destination for those packets are not the same as the initial packet Routing Processor This is the part of router that handles the routing protocol and performs the operations required for the routing protocol